package com.ruoyi.location.repository;

import com.ruoyi.location.repository.generator.entity.*;
import com.ruoyi.location.repository.generator.mapper.LocationUserInfoMapper;
import com.ruoyi.location.vo.req.UserNameUpdateReq;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class UserRepository {

    @Autowired
    private LocationUserInfoMapper locationUserInfoMapper;

    public void updateUserInfo(UserNameUpdateReq req) {
        LocationUserInfo u = new LocationUserInfo();
        u.setUserId(req.getUserId());
        u.setNickName(req.getUserName());
        u.setAvatar(req.getAvatar());
        locationUserInfoMapper.updateByPrimaryKeySelective(u);
    }
}
